Lazy Initialization
The book has now been published and the content of this chapter has likely changed substanstially.Access an instance variable via a method that hides whether or not it has been initialized. Defer initialization until the first actual usage.
Write a Getting Method for the variable. Initialize it if necessary with a Default Value Method.
Further Reading
This was described in Kent Beck's "Smalltalk Best Practice Patterns" [SBPP] as a best practice in the smalltalk community.Copyright © 2003-2008 Gerard Meszaros all rights reserved